package com.qidian.buy.cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qidian.buy.cms.entity.ContentCategory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qidian.buy.cms.mapper.ContentCategoryMapper;
import com.qidian.buy.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 戴着假发的程序员
 * @since 2024-05-06
 */
public interface IContentCategoryService extends IService<ContentCategory> {
    /**
     * 根据父id查询
     * @param parentId
     * @param page
     * @param size
     * @return
     */
    QdResult<IPage<ContentCategory>> queryByParentIdAndPage(Long parentId, Integer page, Integer size);

    QdResult saveContentCat(ContentCategory category);

    QdResult<List<ContentCategory>> queryAll();

    List<ContentCategory> queryByParentId(Long parentId);
}
